#include <iostream>
#include <cstring>

void strcopy(char* source, char* dest)
{
    if (!source || !dest)
        throw std::invalid_argument("!source || !dest");
    
    std::strcpy(dest, source);
}

class A {
private:
    size_t num;

public:
    A(size_t num) 
        try : num(num) {

        }
        catch(...) {
            
        }   
};

int func(int a) noexcept
{
    throw std::invalid_argument("0.0");
    return a;
}

int main() {
    try {
        strcopy(nullptr, nullptr);
    }
    catch(const std::invalid_argument& e) {
        std::cout << e.what() << std::endl;
    }

    try
    {
        func(10);
    }
    catch(const std::invalid_argument& e)
    {
        std::cerr << e.what() << '\n';
    }
    
}